<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>超市账单管理系统-账单管理</title>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>

	<div class="menu">

		<table>
			<tbody>
				<tr>
					<td><form method="post" action="${pageContext.request.contextPath}/BillServlet?type=manySearch">
							<input name="method" value="query" class="input-text" type="hidden"> 
							商品名称：<input name="productName" class="input-text" type="text"  >
							供应商名称：<input name="proName" class="input-text" type="text" >
							
							是否付款：<input type="radio" name="payed"  value="1" />是<input type="radio" name="payed"  checked="checked" value="0" />否
							<input value="查 询" type="submit">
						</form>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="main">

		<div class="optitle clearfix">
			<em><input value="添加账单" class="input-button"
				onclick="window.location='${pageContext.request.contextPath}/BillServlet?type=goAdd'" type="button">
			</em>
			<div class="title">账单管理&gt;&gt;</div>
		</div>
		<div class="content">
			<table class="list">
				<tbody>
					<tr>
						<td width="70" height="29"><div class="STYLE1" align="center">编号</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">商品名称</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">供应商</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">账单金额</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">是否付款</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">操作时间</div>
						</td>
					</tr>
					<c:forEach var="bill" items="${bills}">
					<tr>
						<td height="23"><span class="STYLE1">${bill.billId}</span>
						</td>
						<td><span class="STYLE1"><a href="${pageContext.request.contextPath}/BillServlet?type=goUpdate&billId=${bill.billId}"> ${bill.productName}</a>
						</span>
						</td>
						<td><span class="STYLE1"> ${bill.proName}</span>
						</td>
						<td><span class="STYLE1">${bill.billMoney}</span>
						</td>
						<td><span class="STYLE1"><c:choose>
							<c:when test="${bill.payed==1}">是</c:when>
							<c:otherwise> 否</c:otherwise>
						</c:choose></span>
						</td>
						<td><span class="STYLE1">${bill.opTime}</span>
						</td>
					</tr>
					</c:forEach>
					
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>